home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_bind.idb / usr / freeware / catman / p_man / cat3 / getnameinfo.Z / getnameinfo
Text File  |  2001-04-12  |  3KB  |  56 lines

  1.  
  2. GETRNAMEINFO(@LIB_NETWORK_EXT@)         LOCAL     GETRNAMEINFO(@LIB_NETWORK_EXT@)
  3.  
  4. NNAAMMEE
  5.      ggeettnnaammeeiinnffoo - address-to-name translation in protocol-independent manner
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssyyss//ssoocckkeett..hh>>
  9.      ##iinncclluuddee <<nneettddbb..hh>>
  10.  
  11.      _i_n_t
  12.      ggeettnnaammeeiinnffoo(_c_o_n_s_t _s_t_r_u_c_t _s_o_c_k_a_d_d_r _*_s_a, _s_o_c_k_l_e_n___t _s_a_l_e_n, _c_h_a_r _*_h_o_s_t,
  13.          _s_i_z_e___t _h_o_s_t_l_e_n, _c_h_a_r _*_s_e_r_v, _s_i_z_e___t    _s_e_r_v_l_e_n, _i_n_t _f_l_a_g_s)
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.      The ggeettnnaammeeiinnffoo() function    is defined for protocol-independent address-
  17.      to-nodename translation.  It performs functionality of gethostbyad
  18.      dr(@LIB_NETWORK_EXT@) and getservbyport(@LIB_NETWORK_EXT@)    in more    so
  19.      phisticated manner.
  20.  
  21.      The _s_a arguement is a pointer to a    generic    socket address structure of
  22.      size _s_a_l_e_n. The arguements    _h_o_s_t and _s_e_r_v are pointers to buffers to hold
  23.      the return    values.     Their sizes are specified by _h_o_s_t_l_e_n and _s_e_r_v_l_e_n
  24.      repectively.  Either _h_o_s_t or _s_e_r_v may be NULL if the hostname  or service
  25.      name is not required.
  26.  
  27.      The _f_l_a_g_s arguement modifies the behaviour    of ggeettnnaammeeiinnffoo() as follows:
  28.  
  29.      If    NI_NOFQDN is set only the unqualified hostname is returned for local
  30.      fully qualified names.
  31.  
  32.      If    NI_NUMERICHOST is set then the numeric form of the hostname is re
  33.      turned.
  34.  
  35.      If    NI_NAMEREQD is set, then a error is returned if    the hostname cannot be
  36.      looked up.
  37.  
  38.      If    NI_NUMERICSERV is set then the service is returned in numeric form.
  39.  
  40.      If    NI_DGRAM is set    then the service is UDP    based rather than TCP based.
  41.  
  42. SSEEEE AALLSSOO
  43.      getaddrinfo(@LIB_NETWORK_EXT@),  gethostbyaddr(@LIB_NETWORK_EXT@),
  44.      getservbyport(@LIB_NETWORK_EXT@),    hosts(@FORMAT_EXT@),
  45.      services(@FORMAT_EXT@),  hostname(@DESC_EXT@),  named(@SYS_OPS_EXT@)
  46.  
  47.      R.    Gilligan, S.  Thomson, J. Bound, and W.    Stevens, ``Basic Socket    Inter
  48.      face Extensions for IPv6,'' RFC2133, April    1997.
  49.  
  50. SSTTAANNDDAARRDDSS
  51.      The ggeettaaddddrriinnffoo() function    is defined IEEE    POSIX 1003.1g draft specifica
  52.      tion, and documented in ``Basic Socket Interface Extensions for IPv6''
  53.      (RFC2133).
  54.  
  55.                    January 11, 1999                     1
  56.